import { create } from 'zustand';

export const useStore = create<{
  collapsed: boolean;
  currentMenu: string; //当前菜单
  setCurrentMenu: (menu: string) => void;
  updateCollapsed: () => void;
}>((set) => ({
  collapsed: false,
  currentMenu: '/dashboard',
  setCurrentMenu: (menu) => set({ currentMenu: menu }),
  updateCollapsed: () => set((state) => ({ collapsed: !state.collapsed })),
}));
